﻿using Microsoft.Xna.Framework;
using SomeGame.GUI.Widgets.Containers;
using SomeGame.Tools;
using SomeGame.Zones;

namespace SomeGame.GUI.Screens {

    public class PlayScreen : Screen {

        public PlayScreen() {
            Name = ScreenManager.PLAY_SCREEN;
            RootContainer = new RootContainer(this, GameEngine.Blank, GameEngine.GameBounds, Color.Transparent);
            RootContainer.Layout();
        }

        public override void Update(GameTime gameTime) {
            if (GameEngine.IsPaused) {
                return;
            }
            if (ZoneManager.CurrentZone == null) {
                ZoneManager.LoadZone("SomeZone.dat");
            }
            BehaviorEngine.Update(gameTime);
            PhysicsEngine.Update(gameTime);
            RenderingEngine.Update(gameTime);
            base.Update(gameTime);
        }

        protected override void DrawGameObjects() {
            RenderingEngine.Draw();
        }

    }

}